//类型重命名
#include <stdio.h>

#define CHAR_POINT char*
typedef char* CHARPOINT;
/*
//写法1
struct Student
{
    int IID;
    char caName[30];
};
typedef struct Student STU;
*/

//写法2
typedef struct Student
{
    int IID;
}STU;
/*
int main(void)
{
    CHAR_POINT a,b;   //a是指针 b是字符
    CHARPOINT aa,bb;  //aa bb都是指针
    return 0;
}
*/
void change(STU *s)
{
    s->IID=99;
}
void changeno(STU s)
{
    s.IID=99;
}
void main(void)
{
    STU stu={1001};
    printf("ID=%d\n",stu.IID);   //1001
    changeno(stu);
    printf("ID=%d\n",stu.IID);   //1001
    change(&stu);
    printf("ID=%d\n",stu.IID);   //99
    
    //结构体数组
    STU stu2[3]={{3},{4},{5}};
    int i=0;
    for(i=0;i<3;i++)
    {
        printf("ID=%d\n",stu2[i].IID);
        printf("ID=%d\n",(stu2+i)->IID);
    }
}